<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <button @click="handle">更改</button>
    <div id="app1">
      {{ app1 }}
    </div>
    <div id="app2">
      {{ app2 }}
    </div>
  </div>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.9/vue.js"></script>
  <script>
    const vm = new Vue({
      el: '#app',
      data: {
        app1: 'hello app1',
        app2: 'hello app2'
      },
      methods: {
        handle () {
          this.app1 = 'hello app1'
          this.app2 = 'hello app2'
        }
      }
    })
  </script>
</body>
</html>